layui.define([ 'form', 'laydate', 'table','popUserAdvanceApi'], function(exports) {
    var form = layui.form;
    var table = layui.table;
    var index = layui.index;
    var popUserAdvanceTable = null;
    var popUserAdvanceApi = layui.popUserAdvanceApi;
    var view = {
        init:function(){
        	  this.initSubmit();
        },
        initSubmit:function(){
        	//预存款充值
        	 $("#topUp").click(function(){
        		 //如果未设置密码，跳转到安全中心设置密码
//        		if(false){
//        			
//        		}else{
        			location.href="/user/popUserAdvance/topUp.do";
  //      		}
        		
            });//------------------ 	
        	 $("#exportRecord").click(function(){
        		 Common.openConfirm("确认要导出这些交易记录吗?",function(){
        			 popUserAdvanceApi.exportuserAdvances($("#searchForm"),function(fileId){
				           Lib.download(fileId);
				        })
	                }) 
            });//------------------ 	
        }
            
    }
    exports('index',view);
	
});